<?php 
    @header('Content-type:text/html;charset=UTF-8');
    session_cache_limiter('private, must-revalidate');
    if (true === version_compare(phpversion(), '5.2.4', '<')) {//Php version checking
    	exit('Boot failure ! PHP version number must be great than 5.2.4.');
    }
    define('DS', DIRECTORY_SEPARATOR);

    defined('PROJECT_ROOT')|| define('PROJECT_ROOT',realpath(dirname(__FILE__)));
    defined('CACHE_ROOT')|| define('CACHE_ROOT',PROJECT_ROOT.'/data/cache');

    defined('APPLICATION_PATH')|| define('APPLICATION_PATH',PROJECT_ROOT . '/../application');
    defined('ZEND_LIBARAY_NAME')|| define('ZEND_LIBRARY_NAME','Zend_1_12');

    defined('APPLICATION_ENV')|| define('APPLICATION_ENV',(getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV'): 'production'));


    set_include_path(implode(PATH_SEPARATOR, array(
        PROJECT_ROOT.'/../library',
        get_include_path(),
    )));
    
    require_once ZEND_LIBARAY_NAME.'/Loader/Autoloader.php';
    require_once ZEND_LIBARAY_NAME.'/Application.php';
    Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
    
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH.'/configs/application.ini');
    //$application->getBootstrap()->bootstrap('Router');
    $application->bootstrap()->run();
?>